const stepConfig = require("./stepConfig");
const harFilterConfig = require("./harFilterConfig");

const config = {

    database: {
        //host: "172.16.209.248",
        //host: "192.168.71.100",
        host: "127.0.0.1",
        //host:"172.16.9.51",
        port: 3306,
        user: "root",
        password: "1q2w3e4r",
        db: "automated_performance_platform_db",
    },

    path: {
        data: "C:\\Users\\Administrator\\Desktop\\自动化性能\\automated-performance-data",
        //data: "C:\\Users\\毛建杰\\Desktop\\automated-performance-data",
        //data:"/usr/local/winning/automated-performance-data"
    },

    redis: {
        //host: "172.16.209.248",
        //host: "192.168.71.100",
        host: "127.0.0.1",
        //host:"172.16.9.51",
        port: 6379,
        //password: "1q2w3e4r",
        db: 0,
    },

    dify: {
        enabled: false,
        stepName: {
            //url: "http://192.168.71.100/v1/workflows/run",
            //token: "app-Y31ZVkGvfl3IbrXVkUY5Qo5z",
            //url: "https://wxp.cpp.iwincloud.com:2443/CopilotBaseApi/v1",
            //token: "app-M4p7kYRHkpAF3Op2m0T0wvNt"
            url: "http://172.16.7.127:5001/CopilotBaseApi/v1",
            token: "app-M4p7kYRHkpAF3Op2m0T0wvNt"
        }
    },

    jmx: {
        winex: {
            medicalRecordCreation: {
                testPlanName: "01.建档",
                inputConfigs: [
                    {
                        redisKey: "hisAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "users",
                        redisVariableNames: ["fullName", "idcardNo", "phone"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone",]
                    }
                ],
                outputConfigs: [
                    {
                        redisKey: "patients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId"]
                    },
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [
                    { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/biz_opt_point_scenario_control_rule/check", name: "fullName" },
                    { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/biz_opt_point_scenario_control_rule/check", name: "idcardNo" },
                    { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/biz_opt_point_scenario_control_rule/check", name: "phone" },
                ],
                forcedResponseConfigs: [
                    { urlPath: "/encounter-patient/api/v1/person_patient/personal_file/save", name: "personId" },
                    { urlPath: "/encounter-patient/api/v1/person_patient/personal_file/save", name: "bizRoleId" },
                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            registration: {
                testPlanName: "02.挂号",
                inputConfigs: [
                    {
                        redisKey: "hisAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "patients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "idcardNo"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "indexSearchKeyword"]
                    },
                    {
                        redisKey: "schedules",
                        redisVariableNames: ["bizResourcePoolId", "essId", "encDeptId", "essTypeCode", "noonTypeCode", "essChannelId", "essCategoryId", "encChargeServiceId", "essCategoryCode"],
                        jmxVariableNames: ["bizResourcePoolId", "essId", "encDeptId", "essTypeCode", "noonTypeCode", "essChannelId", "essCategoryId", "encChargeServiceId", "essCategoryCode"],
                        isReusable: true
                    },
                ],
                outputConfigs: [
                    {
                        redisKey: "registeredOutpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "encounterId"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "encounterId"]
                    }
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [
                    { urlPath: "/person-component/api/v1/person_component/patient_info/query/by_search_index", name: "indexSearchKeyword" },
                ],
                forcedResponseConfigs: [],
                mapRequestConfigs: [],
                mapResponseConfigs: [
                    {
                        field1: { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/bill/generate", name: "billId" },
                        field2: { urlPath: "*", name: "billIdList" }
                    },
                    {
                        field1: { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/bill/generate", name: "settlementId" },
                        field2: { urlPath: "*", name: "settlementIdList" }
                    },
                    {
                        field1: { urlPath: "/outp-finance-fee-basic/api/v1/app_finance_outp/bill/generate", name: "settlementId" },
                        field2: { urlPath: "*", name: "bizSettlementIds" }
                    },
                ],
                customRequestConfigs: [
                    {
                        urlPath: "/schedule-outpatient/api/v1/app_encounter_schedule/encounter_rule_auto_selector/query/by_example",
                        name: "scheduledDate",
                        value: "${__time(yyyy-MM-dd,)}"
                    }
                ],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            outpatientDoctor: {
                testPlanName: "03.门诊医生",
                inputConfigs: [
                    {
                        redisKey: "outpatientDoctorAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "registeredOutpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "encounterId", "idcardNo"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "encounterId", "filterKeyword"]
                    }
                ],
                outputConfigs: [
                    {
                        redisKey: "visitedOutpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "encounterId"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "encounterId"]
                    }
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [
                    { urlPath: "/outpat-encounter/api/v1/encounter_cis/encounter_info_list/query/by_example", name: "filterKeyword" },
                ],
                forcedResponseConfigs: [
                    { urlPath: "/outpat-encounter/api/v1/encounter_cis/encounter_info_list/query/by_example", name: "encounterId" },
                    { urlPath: "/outpat/api/v2/cis/clinical_order/bill", name: "orderId" },

                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            charge: {
                testPlanName: "04.收费",
                inputConfigs: [],
                outputConfigs: [],
                headerConfig: null,
                forcedRequestConfigs: [],
                forcedResponseConfigs: [],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            drugDispensing: {
                testPlanName: "05.发药",
                inputConfigs: [],
                outputConfigs: [],
                headerConfig: null,
                forcedRequestConfigs: [],
                forcedResponseConfigs: [],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            admission: {
                testPlanName: "06.入院",
                inputConfigs: [
                    {
                        redisKey: "hisAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "users",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "phone"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "contactTelephone"]
                    },
                    {
                        redisKey: "inpatientBeds",
                        redisVariableNames: ["wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber", "wardId"],
                        jmxVariableNames: ["wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber", "admWardId"],
                    },
                ],
                outputConfigs: [
                    {
                        redisKey: "registeredInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"]
                    },
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [
                    { urlPath: "/encounter-inp/api/v1/app_encounter_inp/encounter/check", name: "idcardNo" },
                    { urlPath: "/encounter-inp/api/v1/app_encounter_inp/encounter/check", name: "contactTelephone" },
                    { urlPath: "/encounter-inp/api/v1/app_encounter_inp/encounter/check", name: "admWardId" },
                    { urlPath: "/encounter-patient/api/v1/person_patient/personal_file/save", name: "fullName" },
                ],
                forcedResponseConfigs: [
                    { urlPath: "/encounter-patient/api/v1/person_patient/personal_file/save", name: "personId" },
                    { urlPath: "/encounter-patient/api/v1/person_patient/personal_file/save", name: "bizRoleId" },
                    { urlPath: "/encounter-inp/api/v1/app_encounter_inp/encounter/save", name: "encounterId" },
                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            wardAdmission: {
                testPlanName: "07.入区",
                inputConfigs: [
                    {
                        redisKey: "inpatientNurseAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "registeredInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber", "bedId"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber", "inpatBedServiceId"]
                    },
                ],
                outputConfigs: [
                    {
                        redisKey: "inWardInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"]
                    },
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [
                    { urlPath: "/encounter-nurse/api/v1/app_inpatient_encounter/check_before_enter_ward/check", name: "inpatBedServiceId" }
                ],
                forcedResponseConfigs: [],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: [
                    { urlPath: "/encounter-nurse/api/v1/app_inpatient_encounter/encounter_bed_list_new_count/query/by_example", name: "*" },
                    { urlPath: "/encounter-nurse/api/v1/app_inpatient_encounter/patient_list/query/by_example", name: "*" },
                    { urlPath: "/encounter-nurse/api/v1/app_inpatient_encounter/usable_bed_list/query/all", name: "*" },
                ]
            },
            inpatientDoctor: {
                testPlanName: "08.住院医生",
                inputConfigs: [
                    {
                        redisKey: "inpatientDoctorAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "inWardInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        isReusable: true
                    }

                ],
                outputConfigs: [
                    {
                        redisKey: "toBeSignedInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                    }
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [],
                forcedResponseConfigs: [
                    { urlPath: "/inpatient-clinical/api/v1/cis/inpatient/order/batch_prescribe", name: "orderId" },
                    { urlPath: "/inpatient-clinical/api/v1/cis/inpatient/template/batch_quote", name: "orderIds" }
                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [
                    {
                        urlPath: "/inpatient-clinical/api/v3/cis/inpatient/clinical_path_course_order/query",
                        name: "orderKey",
                        value: "search_${__time(,)}_${__threadNum}_${__Random(10000000000000,99999999999999,)}"
                    },
                    {
                        urlPath: "/inpatient-clinical/api/v3/cis/inpatient/clinical_path_course_order/query",
                        name: "orderItemKey",
                        value: "search_order_item_id_${__threadNum}_${__time(,)}_${__Random(10000000000000,99999999999999,)}"
                    }
                ],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            inpatientNurse: {
                testPlanName: "09.住院护士",
                inputConfigs: [
                    {
                        redisKey: "inpatientNurseAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "toBeSignedInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                    }
                ],
                outputConfigs: [
                    {
                        redisKey: "toBeExecutedInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                    }
                ],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [],
                forcedResponseConfigs: [
                    {
                        urlPath: "/material-nurse/api/v1/material_execution_supply/dispense_request_ids/all/query_encounter",
                        name: "encounterId",
                    },
                    {
                        urlPath: "/execution-nurse/api/v1/nis/ward_nis_order/query_step1/by_encounter_ids",
                        name: "execOrderId",
                    }
                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [

                ],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: []
            },
            inpatientNurseExecOrder: {
                testPlanName: "10.住院护士_执行医嘱",
                inputConfigs: [
                    {
                        redisKey: "inpatientNurseAuthorizations",
                        redisVariableNames: ["authorization"],
                        jmxVariableNames: ["authorization"],
                        isReusable: true
                    },
                    {
                        redisKey: "toBeExecutedInpatients",
                        redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                        jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                    }
                ],
                outputConfigs: [{
                    redisKey: "executedInpatients",
                    redisVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                    jmxVariableNames: ["fullName", "idcardNo", "phone", "personId", "bizRoleId", "encounterId", "wardId", "wardNumber", "wardName", "roomId", "roomNumber", "roomName", "bedId", "bedNumber"],
                }],
                headerConfig: { headerNames: ["content-type"], customHeaders: { authorization: "${authorization}" } },
                forcedRequestConfigs: [],
                forcedResponseConfigs: [
                    {
                        urlPath: "/material-nurse/api/v1/material_execution_supply/dispense_request_ids/all/query_encounter",
                        name: "encounterId",
                    },
                    {
                        urlPath: "/execution-nurse/api/v1/nis/ward_nis_order/query_step1/by_encounter_ids",
                        name: "execOrderId",
                    }
                ],
                mapRequestConfigs: [],
                mapResponseConfigs: [],
                customRequestConfigs: [],
                ignoreRequestConfigs: [],
                ignoreResponseConfigs: [
                    {
                        urlPath: "/encounter-nurse/api/v1/app_inpatient_encounter/encounter_bed_list_new_count/query/by_example",
                        name: "*",
                    },
                ]
            }
        }
    },

    stepConfig: stepConfig,
    harFilterConfig: harFilterConfig
}

module.exports = config;